<template>
    <div class="container">
        <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="用户管理" name="first">
                <el-table :data="userMsg" style="width: 100%">
                    <el-table-column prop="unid" label="unid" align="center">
                    </el-table-column>
                    <el-table-column prop="username" label="用户名" align="center">
                    </el-table-column>
                    <el-table-column prop="nickname" label="昵称" align="center">
                    </el-table-column>
                    <el-table-column prop="vipLevel" label="vip等级" align="center">
                    </el-table-column>
                    <el-table-column prop="address" label="操作" align="center">
                        <el-button type="primary">编辑</el-button>
                        <el-button type="danger">删除</el-button>
                    </el-table-column>
                </el-table>
            </el-tab-pane>
            <el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
        </el-tabs>
    </div>
</template>
<script>
    import * as api from "../../../api/index"
    export default {
        data() {
            return {
                activeName: 'first',
                userMsg: []
            }
        },
        methods: {
            handleClick(tab, event) {
                console.log(tab, event);
            }
        },
        created(){
            api.allUsermsg().then(res=>{
                this.userMsg = res.data.data
                console.log(this.userMsg);
            })
        }
    }
</script>
<style>
    .container{
        margin-top: 50px;
    }
</style>